Hi |
Re: Changing Existing Text to Bold |
Re: Changing Existing Text to Bold |
Re: Changing Existing Test to Bold
This is rather tricky and I have not tried it, but here goes.
Object oTable = getTable(current Object)
if (null oTable) halt
//print "ad:\n"
AttrDef ad = mainColumnAttribute(oTable)
if (null ad) halt
//print "type:\n"
if (ad.typeName "" != "Text") halt
Object rowHead
Object cell
string NameAttr = ad.name
print "Display attr in table: '" NameAttr "'\n"
bool DoBold = true
string Value = ""
for rowHead in oTable do
{
DoBold = !DoBold
for cell in row rowHead do
{
if (isDeleted(cell ) and
length(doorsInfo(infoVersion)) >=7 and
(doorsInfo(infoVersion))[0:6] == "9.2.0.1") continue // DOORS version 9.2.0.1 bug
Value = probeAttr_(cell, NameAttr) // Raw text value
if (DoBold) //
then cell.NameAttr = richText("{\\b " Value "}") // Set Rich Bold
else cell.NameAttr = Value // Possibly erase existing Bold
}
}
|